Application availability and disaster recovery are two significant issues facing Information Technology (IT) administrators. Whether from physical failure, human error, lack of computing resources, or a system crash, application unavailability is inevitable without an appropriate high-availability and/or disaster-recovery solution.
Today, IT administrators are increasingly relying on virtualization technologies to provide application high availability and disaster recovery in order to simplify management of their IT infrastructures. Typical server virtualization technologies may enable multiple virtualized servers to concurrently run on the same physical host (e.g., hypervisor) as virtual machines, which may reduce the number of physical machines that IT administrators must manage and maintain. Virtualization technologies may provide application high availability and disaster recovery by enabling virtual machines that run applications to run on any of a plurality of hypervisor and/or move from one of the plurality of hypervisors to another (e.g., as a way to balance virtual-machine resource utilization across the plurality of hypervisors and/or as a way to restart virtual machines that have failed).
Because virtual machines may move from one hypervisor to another, typical virtualization technologies may implement affinity rules to allow an IT administrator to indicate whether two virtual machines should run on the same hypervisor and/or different hypervisors (e.g., for application performance or disaster recovery purposes). For example, an IT administrator may create an affinity rule between a virtual machine running a web server and a virtual machine running a database that is accessed by the web server to ensure that both virtual machines are placed on the same hypervisor, which may reduce the latency of network traffic flowing between the web server and the database. In another example, the IT administrator may create an anti-affinity rule between two virtual machines that are running instances of the same database (e.g., a virtual machine running a database instance acting as a master and another virtual machine running a database instance acting as a slave) to ensure that the two virtual machines run on separate hypervisors so that the database remains functional in the event that one of the hypervisors running the two database instances fails.
Unfortunately, managing affinity and anti-affinity rules between virtual machines may become more complicated in virtual-machine environments in which applications may move among virtual machines. For example, another technology used to provide application high availability and disaster recovery may include a cluster of servers that is capable of running one or more applications. If an application running within the cluster fails (e.g., as a result of the failure of the server on which the application runs), the application may be restarted on another server within the cluster. In some instances, a cluster may be implemented within a virtual-machine environment (e.g., as an in-guest cluster). However because applications may move from one virtual machine to another, an IT administrator may be unable to use static virtual-machine affinity and/or anti-affinity rules to ensure that two applications run on the same hypervisor or different hypervisors, which may result in reduced application performance and/or disaster recovery ability. Accordingly, the instant disclosure identifies a need for additional and improved systems and methods for managing affinity rules in virtual-machine environments.